package com.gec.system.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gec.model.entity.SysActivity;
import com.gec.model.entity.SysStatic;
import com.gec.system.mapper.SysStaticMapper;
import com.gec.system.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ahthor: lxj
 * @date: 2023/12/12 20:40
 * @title:
 **/

@Api(tags = "静态管理")
@RestController
@RequestMapping("/admin/system/SysStatic")
public class SysStaticController {

    @Autowired
    private SysStaticMapper sysStaticMapper;

    @ApiOperation("获取信息")
    @GetMapping("/findStatic/{className}")
    public Result findStatic(@PathVariable String className)
    {
        QueryWrapper<SysStatic> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("class_name",className);
        List<SysStatic> list= this.sysStaticMapper.selectList(queryWrapper);
        return Result.ok(list);
    }



}
